﻿@model LoginViewModel

@{ this.Layout = "~/Views/Shared/Layout.cshtml"; }

@this.Html.RenderMessage()

<div class="login">
	@using (this.Html.BeginForm())
	{ 
		<div>
			<span>@Resources.UserName:</span><input name="userName" type="text" value="@this.Model.UserName" maxlength="@AdminSettings.MaxUserNameLength" class="@(this.Model.IsUserNameValid ? "" : "errorInput")" />
		</div>
		
		<div>
			<span>@Resources.Password:</span><input name="password" type="password" value="@this.Model.Password" maxlength="@AdminSettings.MaxPasswordLength" class="@(this.Model.IsPasswordValid ? "" : "errorInput")" />
		</div>
		
		@this.Html.RenderCaptcha(this.Model.IsCaptchaValid)
		
		<div class="submitLogin">
			<button class="linkButton" type="submit" title="@Resources.LoginToAdminMode">@Resources.Login</button>
		</div>
	}
	<div class="resetPasswordButton">
		<a href="@this.Url.Action("ResetPassword")" title="@Resources.GenerateNewPassword">@Resources.ResetPassword</a>
	</div>
</div>
